#ifndef INPUT_H
#define INPUT_H

#include <QObject>
#include "inputfunction.h"
#include <QDebug>
class InputFunction;
class Input : public QObject
{
    Q_OBJECT
public:
    enum Status{
        RESET = 0,
        SET
    };

    explicit Input(uint no);
    void (InputFunction::*inputFunction)(bool);
    uint getNo() {return mNo;}
    void setStatus(Status status) {mStatus = status;qDebug()<<status;emit statusChanged(status);}
    void setFunctionNum(uint fn) {mFunctionNum = fn;}
    void setNormalStatus(uint normalstatus) {mNormalStatus = normalstatus;}
    uint getFunctionNum() {return mFunctionNum;}
    uint getNormalStatus() {return mNormalStatus;}
    Status getStatus() {return mStatus;}

    void setFuncName(const QString& funcName) {mFuncName = funcName;}

    QString getFuncName() {return mFuncName;}
signals:
    void statusChanged(Input::Status);

public slots:
private:
    uint mNo;
    uint mFunctionNum;
    Status mStatus;
    uint mNormalStatus;
    QString mFuncName;
};

#endif // INPUT_H
